const is__d_call = require('./is__d_call');
const getPropValue = require('../common/utility.js').getPropValue;

function get_define_number(ast){
	if(!is__d_call(ast)){
		return null;
	}
	var value = getPropValue(ast,['expression','arguments',1,'value']);
	if((typeof value==='number') && (!isNaN(value))){
		return value;
	} else {
		return null;
	}
}

module.exports = get_define_number;

